import java.io.*;

//利用打印流进行文件复制
public class FileCopy_PrintStream {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader("MyFile\\src\\tmp\\test.txt"));
        PrintWriter pw = new PrintWriter(new FileWriter("MyFile\\src\\tmp\\printstreamCopy.txt"),true);
        String line;
        while((line = br.readLine()) != null)
            pw.println(line);
        br.close();
        pw.close();
    }

}
